* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  background-color: #000;
}

.container {
  position: relative;
  inset: 50% 0 0 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
}

.loader {
  position: absolute;
  inset: 50% 0 0 50%;
  /* CSS 动画使用 transform 这里不能使用 transform 了 否则会出 BUG */
  /* transform: translate(-50%, -50%); */
  border-radius: 50%;
  border: 3px solid transparent;
}

.container .loader:nth-child(1) {
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-top-color: #9370db;
  animation: loadRotate 1.5s linear infinite;
}

.container .loader:nth-child(2) {
  width: 135px;
  height: 135px;
  margin: -67px 0 0 -67px;
  border-top-color: #ba55d3;
  animation: loadRotate 2s linear infinite;
}

.container .loader:nth-child(3) {
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border-top-color: #ff00ff;
  animation: loadRotate 3s linear infinite;
}

@keyframes loadRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(720deg);
  }
}
